* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

h2 {
    margin-bottom: 15px;
    color: #444;
    font-size: 18px;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#task-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#add-task-btn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#add-task-btn:hover {
    background-color: #45a049;
}

.task-list-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

#task-list {
    list-style-type: none;
}

.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #f9f9f9;
}

.task-text {
    cursor: pointer;
    flex: 1;
}

.task-text.completed {
    text-decoration: line-through;
    color: #888;
}

.delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    .input-section {
        flex-direction: column;
    }
    
    #add-task-btn {
        width: 100%;
    }
}